<?php

namespace App\Controllers\v1;

use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use common\utils\SysCode;
use App\Controllers\BaseController;
use App\Services\GameService;

class GameController extends BaseController
{

    //第三方游戏入口
    public function GameLogin(Request $request)
    {
        $user = Auth::user();
        $game = $request->input("g", "Pt");
        $method = $request->input("c", "gameUrl");
        //对应平台0-pc 1-H5
        $platform = $request->input("p", 0);
        $data = GameService::login(Auth::user(), $game, $method, $platform);
        return $data;
    }
}
